package com.enation.app.shop.front.policyInsurance.area.service;

import com.enation.app.shop.front.policyInsurance.area.entity.Area;
import com.enation.framework.database.IDaoSupport;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service("AreaService")
public class AreaService implements AreaManager {
    @Autowired
    private IDaoSupport daoSupport;
    @Override
    public List<Area> getAreaByCityId(String id) {
        String sql="select * from hat_area where father =?";
        return this.daoSupport.queryForList(sql,Area.class,id);
    }

    @Override
    public Area getById(String areaId) {
        String sql="select * from hat_area where areaId =?";
        return this.daoSupport.queryForObject(sql,Area.class,areaId);
    }
}
